# -*- coding: utf-8 -*-
"""
author:码同学 极光
date:2025/3/1
desc: 
sample: 
"""
class Student:
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def __hash__(self):
        return hash((self.name, self.age))

    def __eq__(self, other):
        if isinstance(other, Student):
            return self.name == other.name and self.age == other.age
        return False

    def __repr__(self):
        return f"Student(name={self.name}, age={self.age}"

class Persion:
    def __init__(self, name, age):
        self.name = name
        self.age = age


class Clz:
    def __init__(self, name):
        self.name = name
        self.student_list = set()

    def add_student(self, student):
        self.student_list.add(student)

    def remove_student(self, student):
        self.student_list.remove(student)

    @property
    def print_student(self):
        for student in self.student_list:
            print(student.name, student.age)

student1 = Student('张三', 18)
student2 = Student('李四', 19)
print(student2)
student3 = Student('李四', 19)
print(student3)
cl1 = Clz('1班')
cl1.add_student(student1)
cl1.add_student(student2)
cl1.add_student(student3)
cl1.print_student
